#ifndef ENEMY_HH
#define ENEMY_HH
#include "Character.hh"

//This header file defines an Enemy class that inherits from an ICharacter interface. It models an enemy character with attributes like name, health, attack power, and defense. Key functionalities include:

//Attributes:
//Name, health, attack power, and defense.
//An inventory (std::vector<Item*>) to store items (currently not fully implemented).
//Methods:
//Status Check: isAlive() to determine if the enemy is still alive.
//Inventory Management: addToInventory(Item*) and displayInventory() (currently placeholders with no implementation).
//Combat: takeDamage(unsigned damage) and attack(ICharacter& target) (implementation expected elsewhere).
//Getters: For name, health, attack, and defense.
//Destructor: A virtual destructor is declared but not defined (~Enemy();), indicating potential cleanup logic in the implementation file.
//This class is designed for RPG-style systems, managing enemy attributes and combat interactions.

class Enemy : public ICharacter {
    std::string name;
    unsigned health;
    unsigned attacks;
    unsigned defense;
    

public:
    std::vector<Item*> inventory;
    Enemy(std::string n, unsigned h, unsigned a, unsigned d, unsigned m)
        : name(n), health(h), attacks(a), defense(d) {}

    ~Enemy();
    bool isAlive()  { return health > 0; }
    void addToInventory(Item*)  {}
    void displayInventory() const{}
    
    bool takeDamage(unsigned damage);
    bool attack(ICharacter& target);

    std::string getName() const  { return name; }
    unsigned getHealth() const  { return health; }
    unsigned getAttack() const { return attacks; }
    unsigned getDefense() const  { return defense; }
};
#endif